from django.conf import settings
from django.conf.urls import url
from . import views
from django.views.static import serve

urlpatterns = [
    url(r'^media/(?P<path>.*)$', serve, {"document_root": settings.MEDIA_ROOT}),
    # 注册 登陆
    url(r"register", views.register, name="register"),
    url(r"login", views.login, name="login"),
    # 上传文件
    url(r'UpFile/$', views.UpFile.as_view(), name='UpFile'),
    # 分批加载文件给前端
    url(r'files', views.files, name="files"),
    # 后端刷新  ， 进行文件处理
    url(r'flush_process/$', views.flush_process, name='flush_process'),
    # 下载图文件 json
    url(r'downloadFile', views.DownloadFile.as_view(), name="download_file"),
    # 节点搜素
    url(r'search', views.Search.as_view(), name="search"),
]
# + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
